package cn.wolfcode.luowowo.search.service;

import cn.wolfcode.luowowo.search.query.HotelSearchQuery;
import cn.wolfcode.luowowo.search.template.HotelTemplate;
import cn.wolfcode.luowowo.search.vo.StatisVO;
import org.elasticsearch.index.query.QueryBuilder;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

/**
 * es中目的地的搜索服务
 */
public interface IHotelTemplateSearchService {


    List<StatisVO> conditionGroupByQo(String groupName,String nameField,HotelSearchQuery qo);

    /**
     * 添加或更新
     */

    void saveOrUpdate(HotelTemplate template);


    HotelTemplate findByName(String keyword);

    List<HotelTemplate> findByDestName(String name);

    List<HotelTemplate> findByDestId(Long id);

    List<StatisVO> conditionGroup(String groupName, String nameField, QueryBuilder queryBuilder);

    Page<HotelTemplate> searchHotel(HotelSearchQuery qo);

    List<StatisVO> conditionGroupByQoChange(String groupName,String nameField,HotelSearchQuery qo);

    List<Map<String,Object>> getAvgPrice(HotelSearchQuery qo);
}
